﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DBUtlity;
using Models;
using System.Data;
using System.Data.SqlClient;
namespace DAL
{
    public class PJLogService
    {
        #region 新增
        /// <summary>
        /// 新增一条报价记录
        /// </summary>
        /// <param name="baojia"></param>
        /// <returns></returns>
        public int InsertLog(PJLog pjLog)
        {
            string sql = "insert into PJLogs(PJId,Stage,Person,CompleteDate,LogContent,Statues,Creater)";
            sql += "values(@PJId,@Stage,@Person,@CompleteDate,@LogContent,@Statues,@Creater)";
            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@PJId",pjLog.PJId),
                new SqlParameter("@Stage",pjLog.Stage),
                new SqlParameter("@Person",pjLog.Person),
                new SqlParameter("@CompleteDate",pjLog.CompleteDate),
                new SqlParameter("@LogContent",pjLog.LogContent),
                new SqlParameter("@Statues",pjLog.Statues),
                new SqlParameter("@Creater",pjLog.Creater)
            };
            return SQLHelper.Update(sql, param);
        }
        #endregion
    }
}
